// httpserver
package main

import (
	"fmt"
	"html"
	"io"
	"log"
	"net/http"
)

const READ_TIMEOUT = 10000
const WRITE_TIMEOUT = 10000

func main() {
	fmt.Println("Hello World!")

	http.HandleFunc("/hello", func(w http.ResponseWriter, req *http.Request) {
		req.ParseForm()
		age := req.Form["age"][0]
		fmt.Println("age is ", age)
		io.WriteString(w, " hello ! am go server!!!"+html.EscapeString(req.URL.Path))
		io.WriteString(w, "\n\tage is :"+age)

	})

	error := http.ListenAndServe(":8080", nil)
	if error != nil {
		log.Fatal("listener server:", nil)
	}
	log.Println("server start ok!!")
}
